<template>
    <HeaderBar :title="title" />
    <view class="main-container">
        <rich-text :nodes="content"></rich-text>
    </view>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import HeaderBar from '@/components/HeaderBar/index.vue';
import { getStorage } from '@/utils/common';
const title = ref<string>('');
const content = ref<string>('');

onLoad(() => {
    getList();
});

//初始化加载，获取列表数据
const getList = () => {
    const detail = getStorage('faqDetail') || {};
    title.value = detail.name;
    content.value = detail.content;
};
</script>

<style lang="scss" scoped>
.faq-content {
    padding: 40rpx;
    font-size: 28rpx;
    line-height: 44rpx;
    color: #333;
    image {
        width: 100%;
    }
}
</style>
